package com.cloudbroker.openapi.manage.controller;

import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.csvc.lightinvesting.api.t2service.LedThreeT2Service;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.DataDictionaryQueryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.baseRelevanted.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.cashTransactions.LimitedAmountQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.cashTransactions.AllowExcepByDayForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.cashTransactions.ComuserSignRecordQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.cashTransactions.SignfocusApplyQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.cashTransactions.TransferHisLogQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.fansRelated.AdviserteamAddributionQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.fansRelated.HisBusinessQryForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.fansRelated.StockBlackTabForm;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.interestRelated.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.DataDictionaryBackVO;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.baseRelevanted.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.cashTransactions.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.fansRelated.AdviserteamAddributionQryBackVo;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.fansRelated.HisBusinessQryBackVo;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.fansRelated.StockBlackTabBackVo;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.interestRelated.*;
import com.cloudbroker.bcs.platform.ltb.common.ext.annotation.SaveLog;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import static com.cloudbroker.bcs.platform.ltb.common.util.RequestUtil.getSingleParameterMapForBody;

/**
 * Created by fangyf18371 on 2016/12/19.
 * 三阶段接口
 */
@Controller
public class LedThreeController {
    @Resource
    protected LedThreeT2Service ledThreeT2Service;

    /**
     * 投顾当日剩余允许打赏金额查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcomacct_rewark_amount_qry")
    @SaveLog(remark = "投顾当日剩余允许打赏金额查询")
    public AllowExcepByDayVo func_extcomacct_rewark_amount_qry(HttpServletRequest request, String jsonpcallback){
        AllowExcepByDayForm form = getSingleParameterMapForBody(request , AllowExcepByDayForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcomacct_rewark_amount_qry(form), jsonpcallback);
    }

    /**
     * 达人改签申请
     * 投顾申请改签跟投模式，comfare_mode传入想要改签成的类型
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comuser_sign_change")
    @SaveLog(remark = "达人改签申请")
    public CmuserSignChangeVo func_comuser_sign_change(HttpServletRequest request, String jsonpcallback){
        CmuserSignChangeForm form = getSingleParameterMapForBody(request , CmuserSignChangeForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comuser_sign_change(form), jsonpcallback);
    }

    /**
     * 达人改签申请审核不通过
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comuser_sign_change_verify_nopass")
    @SaveLog(remark = "达人改签申请审核不通过")
    public SigncChangeNopassVo func_comuser_sign_change_verify_nopass(HttpServletRequest request, String jsonpcallback){
        SigncChangeNopassForm form = getSingleParameterMapForBody(request , SigncChangeNopassForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comuser_sign_change_verify_nopass(form), jsonpcallback);
    }

    /**
     * 达人改签申请审核通过
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comuser_sign_change_verify_pass")
    @SaveLog(remark = "达人改签申请审核通过")
    public SigncChangePassVo func_comuser_sign_change_verify_pass(HttpServletRequest request, String jsonpcallback){
        SigncChangePassForm form = getSingleParameterMapForBody(request , SigncChangePassForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comuser_sign_change_verify_pass(form), jsonpcallback);
    }

    /**
     * 达人签约记录查询
     * 查询达人签约当前消费的记录及最后一笔未消费的续费申请付款状态
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comuser_sign_record_qry")
    @SaveLog(remark = "达人签约记录查询")
    public ComuserSignRecordQryBackVo func_comuser_sign_record_qry(HttpServletRequest request, String jsonpcallback){
        ComuserSignRecordQryForm form = getSingleParameterMapForBody(request , ComuserSignRecordQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comuser_sign_record_qry(form), jsonpcallback);
    }

    /**
     * 历史证券成交查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/his_business_qry")
    @SaveLog(remark = "历史证券成交查询")
    public HisBusinessQryBackVo func_his_business_qry(HttpServletRequest request, String jsonpcallback){
        HisBusinessQryForm form = getSingleParameterMapForBody(request , HisBusinessQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_his_business_qry(form), jsonpcallback);
    }

    /**
     * 投顾信息修改
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comacct_adviser_mod")
    @SaveLog(remark = "投顾信息修改")
    public ComacctAdviserModVo func_comacct_adviser_mod(HttpServletRequest request, String jsonpcallback){
        ComacctAdviserModForm form = getSingleParameterMapForBody(request , ComacctAdviserModForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comacct_adviser_mod(form), jsonpcallback);
    }

    /**
     * 银行转账历史查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcomtrade_his_bktransfer_qry")
    @SaveLog(remark = "银行转账历史查询")
    public TransferHisLogQryBackVo func_extcomtrade_his_bktransfer_qry(HttpServletRequest request, String jsonpcallback){
        TransferHisLogQryForm form = getSingleParameterMapForBody(request , TransferHisLogQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcomtrade_his_bktransfer_qry(form), jsonpcallback);
    }

    /**
     * 订约申请查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcompay_signfocus_apply_qry")
    @SaveLog(remark = "订约申请查询")
    public SignfocusApplyQryBackVo func_extcompay_signfocus_apply_qry(HttpServletRequest request, String jsonpcallback){
        SignfocusApplyQryForm form = getSingleParameterMapForBody(request , SignfocusApplyQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcompay_signfocus_apply_qry(form), jsonpcallback);
    }

    /**
     * 当日单客户允许打赏单投顾剩余金额查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcompay_comdate_limited_amount_qry")
    @SaveLog(remark = "当日单客户允许打赏单投顾剩余金额查询")
    public LimitedAmountQryVo func_extcompay_comdate_limited_amount_qry(HttpServletRequest request, String jsonpcallback){
        LimitedAmountQryForm form = getSingleParameterMapForBody(request , LimitedAmountQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcompay_comdate_limited_amount_qry(form), jsonpcallback);
    }

    /**
     * 投顾团队归属信息查询
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/comadviser_adviserteam_qry")
    @SaveLog(remark = "投顾团队归属信息查询")
    public AdviserteamAddributionQryBackVo func_comadviser_adviserteam_qry(HttpServletRequest request, String jsonpcallback){
        AdviserteamAddributionQryForm form = getSingleParameterMapForBody(request , AdviserteamAddributionQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comadviser_adviserteam_qry(form), jsonpcallback);
    }

    /**
     * 达人签约申请审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcomacct_comusersign_verify")
    @SaveLog(remark = "达人签约申请审核通过")
    public ComusersignApplyThroughVo func_extcomacct_comusersign_verify(HttpServletRequest request, String jsonpcallback){
        ComusersignApplyThroughForm form = getSingleParameterMapForBody(request , ComusersignApplyThroughForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcomacct_comusersign_verify(form), jsonpcallback);
    }

    /**
     * 达人签约申请审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/extcomacct_comusersign_notverify")
    @SaveLog(remark = "达人签约申请审核不通过")
    public ComusersignNotverifyVo func_extcomacct_comusersign_notverify(HttpServletRequest request, String jsonpcallback){
        ComusersignNotverifyForm form = getSingleParameterMapForBody(request , ComusersignNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_extcomacct_comusersign_notverify(form), jsonpcallback);
    }

    /**
     * 产品代码黑名单查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/comtrade_comblackcode_qry")
    @SaveLog(remark = "产品代码黑名单查询")
    public StockBlackTabBackVo func_comtrade_comblackcode_qry(HttpServletRequest request, String jsonpcallback){
        StockBlackTabForm form = getSingleParameterMapForBody(request , StockBlackTabForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_comtrade_comblackcode_qry(form), jsonpcallback);
    }

    /**
     * 组合申请审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_apply_verify")
    @SaveLog(remark = "组合申请审核通过")
    public CombineApplyVerifyVo func_combine_apply_verify(HttpServletRequest request, String jsonpcallback){
        CombineApplyVerifyForm form = getSingleParameterMapForBody(request , CombineApplyVerifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_apply_verify(form), jsonpcallback);
    }

    /**
     * 组合申请审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_apply_notverify")
    @SaveLog(remark = "组合申请审核不通过")
    public CombineApplyNotverifyVo func_combine_apply_notverify(HttpServletRequest request, String jsonpcallback){
        CombineApplyNotverifyForm form = getSingleParameterMapForBody(request , CombineApplyNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_apply_notverify(form), jsonpcallback);
    }

    /**
     * 投顾组合申请查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_apply_qry")
    @SaveLog(remark = "投顾组合申请查询")
    public CombineApplyQryBackVo func_combine_apply_qry(HttpServletRequest request, String jsonpcallback){
        CombineApplyQryForm form = getSingleParameterMapForBody(request , CombineApplyQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_apply_qry(form), jsonpcallback);
    }

    /**
     * 组合信息修改审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_mod_verify")
    @SaveLog(remark = "组合信息修改审核通过")
    public CombineModVerifyVo func_combine_mod_verify(HttpServletRequest request, String jsonpcallback){
        CombineModVerifyForm form = getSingleParameterMapForBody(request , CombineModVerifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_mod_verify(form), jsonpcallback);
    }

    /**
     * 组合信息修改审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_mod_notverify")
    @SaveLog(remark = "组合信息修改审核不通过")
    public CombineModNotverifyVo func_combine_mod_notverify(HttpServletRequest request, String jsonpcallback){
        CombineModNotverifyForm form = getSingleParameterMapForBody(request , CombineModNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_mod_notverify(form), jsonpcallback);
    }

    /**
     * 投顾组合信息修改申请查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_modapply_qry")
    @SaveLog(remark = "投顾组合信息修改申请查询")
    public CombineModapplyQryBackVo func_combine_modapply_qry(HttpServletRequest request, String jsonpcallback){
        CombineModapplyQryForm form = getSingleParameterMapForBody(request , CombineModapplyQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_modapply_qry(form), jsonpcallback);
    }

    /**
     * 组合关闭申请审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_closeapply_verify")
    @SaveLog(remark = "组合关闭申请审核通过")
    public CombineCloseapplyVo func_combine_closeapply_verify(HttpServletRequest request, String jsonpcallback){
        CombineCloseapplyForm form = getSingleParameterMapForBody(request , CombineCloseapplyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_closeapply_verify(form), jsonpcallback);
    }

    /**
     * 组合关闭申请审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_close_notverify")
    @SaveLog(remark = "组合关闭申请审核不通过")
    public CombineCloseNotverifyVo func_combine_close_notverify(HttpServletRequest request, String jsonpcallback){
        CombineCloseNotverifyForm form = getSingleParameterMapForBody(request , CombineCloseNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_close_notverify(form), jsonpcallback);
    }

    /**
     * 投顾组合关闭申请查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/combine_closeapply_qry")
    @SaveLog(remark = "投顾组合关闭申请查询")
    public CombCloseapplyQryBackVo func_combine_closeapply_qry(HttpServletRequest request, String jsonpcallback){
        CombCloseapplyQryForm form = getSingleParameterMapForBody(request , CombCloseapplyQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_closeapply_qry(form), jsonpcallback);
    }

    /**
     * 历史证券委托查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/his_securities_commission_qry")
    @SaveLog(remark = "历史证券委托查询")
    public HiseCommQryBackVo func_his_securities_commission_qry(HttpServletRequest request, String jsonpcallback){
        HiseCommQryForm form = getSingleParameterMapForBody(request , HiseCommQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_his_securities_commission_qry(form), jsonpcallback);
    }

    @ResponseBody
    @RequestMapping("/data_dictionary_qry")
    @SaveLog(remark = "数据字典查询")
    public DataDictionaryBackVO dataDictionaryQuery(HttpServletRequest request, String jsonpcallback) {
        DataDictionaryQueryForm form = getSingleParameterMapForBody(request, DataDictionaryQueryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.dataDictionaryQuery(form), jsonpcallback);
    }

}
